function combination<T>(arr:T[],i:number) :T[]{
  return arr.filter((item,index)=>index<i)
}
console.log( combination<number>([2,3,4,5,6],2))
type typessfx<T> = (a:T,b:T)=>T
interface callback<T> {
    (a:T,b:T):T
}
class ArrayAssist<T>{
    constructor(public arr:T[]) {
    }
    tack(arr:T[],n:number):T[]{
        return arr
    }
    shuffle(){
    }
}
interface klass{
    name:string
}

function Stringkt<T extends klass>(obj:T):T{
    obj.name = '1231231'
    return obj
}
let obj = {
    name:'small kill',
    age:21
}
Stringkt(obj)

function Multiflop<T,K>(arr1:T[],arr2:K[]):(T|K)[]{
    let result:(T|K)[] = [];
    for (let i = 0; i < arr1.length; i++){
        result.push(arr1[i])
        result.push(arr2[i])
    }
    return result
}
Multiflop([1,23,4,5],['1','2','3','4'])